#ifndef SPIRALV2_H
#define SPIRALV2_H

#include <QVector>
#include <QPointF>

#include "../algorithmcommon.h"


class SpiralV2
{
public:
    SpiralV2();
    ~SpiralV2();

    //螺旋线类型几何元素数据
    PointHdg geometrySpiralData(double dXCoordinate, double dYCoordinate, double dHdg, double dLength, double dCurvatureStart, double dCurvatureEnd);

private:
    //螺旋线的子函数
    QPointF subFunctionSpiral(double dScaleFactorA, double dVarValue);
    //获取螺旋线点
    void getGeometrySpiral(double dScaleFactor, double dVar, QVector<QPointF> &qvecGeometrySpiral, QVector<double> &qvecHdg, QVector<double> &qvecS);
    //转换hdg和点坐标Y
    void convertHdgAndY(double dCurvatureStart, double dCurvatureEnd, QVector<QPointF> &qvecGeometrySpiral, QVector<double> &qvecHdg);
    //转换螺旋线起止点
    void convertIndexStartAndEnd(bool bStart, double dLength, QVector<QPointF> &qvecGeometrySpiral, QVector<double> &qvecHdg, QVector<double> &qvecS);
    //旋转坐标系
    void rotateCoordinate(double dSpinHdg, QVector<QPointF> &qvecGeometrySpiral);
    // 后期删除
    void testSpiral(QVector<QPointF> &qvecGeometrySpiral, QVector<double> &qvecHdg, QVector<double> &qvecS);
};

#endif // SPIRALV2_H
